<?php 

class Model_FilmCategory {
    
    public function add($filmId, $categoryId){
        $fCatTbl = new Model_DbTable_FilmCategories();
        $row = $fCatTbl->createRow();
        $row->filmId = $filmId;
        $row->categoryId = $categoryId;
        return $row->save();                
    }
    
    public function removeAllCatsFromFilm($filmId){
        $fCatTbl = new Model_DbTable_FilmCategories();
        $row = $fCatTbl->delete("`filmId` = '$filmId'");
        return $row;        
    }    
    
    
}